Build Install and Launch iOS app on Simulator ovpt 2017-03-25 Simulator, iOS, xcrun Build12# buildxcodebuild -scheme TestApp DSTROOT=./tmp archive Install12# list simluator devicesxcrun simctl list -j devices 123456# list simluator device typesxcrun simctl list -j devicetypes | jq -r '.devicetypes[].name'...iPhone 7iPhone 7 Plus... 123456# get UDID by device typeexport SIM_DEVICE_TYPE='iPhone 7'UDID=$(\xcrun simctl list -j devices | \jq -r '.devices."iOS 10.2"[] | select(.name==env.SIM_DEVICE_TYPE) | .udid' \) 12345# launch simluatorxcrun instruments -w $UDID# orSIM_APP='/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app'open -a $SIM_APP --args $UDID 123# get booted simluatorxcrun simctl list -j devices | \jq -r '.devices."iOS 10.2"[] | select(.state=="Booted") | .udid' 12# install appxcrun simctl install booted ./TestApp-iphonesimulator.app Launch12# launch installed appxcrun simctl launch booted io.appium.TestApp 12# terminate appxcrun simctl terminate booted io.appium.TestApp